package com.ccx.coachsite.ui.manage;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.ccx.coachsite.R;
import com.ccx.coachsite.bus.DateParams;
import com.ccx.coachsite.ui.own.OwerMainBase;

public class ManageSalaryQueryView extends ManageSalaryView {

	DateParams mDateParams;
	public ManageSalaryQueryView(Context context, OwerMainBase superView, DateParams dinfo) {
		super(context, superView);
		mRootView = findViewById(R.id.rootSalaryQueryId);	
		mDateParams = dinfo;
		loadData();
	}
	
	protected void initViews()
	{
	
	}
	
	protected void doRefreshDataSuccess()
	{
		super.doRefreshDataSuccess();
		
		View panelView = mRootView.findViewById(R.id.manage_salary_query_panel);
		panelView.setVisibility(View.GONE);
		
		TextView txtTitle = (TextView)mRootView.findViewById(R.id.manage_salary_top_title);
		txtTitle.setText(mDateParams.getTitleStr() + "薪酬前3名");
		
		TextView txtSalary = (TextView)mRootView.findViewById(R.id.manage_salary_value_title);
		txtSalary.setText(mDateParams.getTitleStr() + "所得薪酬:");
		
		TextView txtRank = (TextView)mRootView.findViewById(R.id.manage_salary_rank_title);
		txtRank.setText(mDateParams.getTitleStr() + "绩效排名:");
	}
	
	protected boolean onLoadData() 
	{
		mSalaryInfo = ManageProvider.getInstance().querySalaryInfo(mContext, mDateParams);
		if (mSalaryInfo == null)
			return false;
		return true;
	}
}
